{namespace vh=In2code\Powermail\ViewHelpers}
<f:layout name="Default" />

Show Confirmation Page
{powermail_rte}					Variable is filled with values from RTE in backend (from thx page)
{powermail_all}					Outputs all fields
{marker1}, {firstname}, etc..	Outputs a field
{mail}							Complete Mail Object
{ttContentData}					All values from content element with plugin
{uploadService}					All values from uploaded files


<f:section name="main">
	<div class="powermail_confirmation" data-powermail-form="{mail.form.uid}">
		<h1><f:translate key="confirmation_message" /></h1>

		<vh:string.RawAndRemoveXss>
			{powermail_all}
		</vh:string.RawAndRemoveXss>

		<div class="btn-group" role="group">
			<f:comment>
				Link: Back to form
			</f:comment>
			<f:form
					action="form"
					name="field"
					enctype="multipart/form-data"
					class="visible-xs-inline-block visible-sm-inline-block visible-md-inline-block visible-lg-inline-block"
 					addQueryString="{settings.misc.addQueryString}"
					additionalAttributes="{vh:Validation.EnableParsleyAndAjax(form: mail.form)}">
				<f:render section="HiddenFields" arguments="{_all}" />
				<f:form.submit
						value="{f:translate(key: 'confirmation_prev')}"
						additionalAttributes="{data-powermail-form-ajax:'confirmation'}"
						class="btn btn-danger" />
			</f:form>


			<f:comment>
				Link: Submit form
			</f:comment>
			<f:form
					action="create"
					name="field"
					enctype="multipart/form-data"
					class="visible-xs-inline-block visible-sm-inline-block visible-md-inline-block visible-lg-inline-block"
					addQueryString="{settings.misc.addQueryString}"
					additionalAttributes="{vh:Validation.EnableParsleyAndAjax(form: mail.form)}">
				<f:render section="HiddenFields" arguments="{_all}" />
				<f:form.submit
						value="{f:translate(key: 'confirmation_next')}"
						additionalAttributes="{data-powermail-form-ajax:'submit'}"
						class="btn btn-primary" />
			</f:form>
		</div>
	</div>
</f:section>



<f:section name="HiddenFields">
	<f:for each="{mail.answers}" as="answer">
		<f:if condition="{vh:Condition.IsArray(val: '{answer.value}')}">
			<f:then>
				<f:for each="{answer.value}" as="subvalue" iteration="i">
					<f:form.hidden property="{answer.field.marker}.{i.index}" value="{subvalue}" />
				</f:for>
			</f:then>
			<f:else>
				<f:form.hidden property="{answer.field.marker}" value="{answer.value}" />
			</f:else>
		</f:if>
	</f:for>

	<f:form.hidden name="mail[form]" value="{mail.form.uid}" class="powermail_form_uid" />
</f:section>
